<template>
  <slot name="edit" v-if="hasEdit"></slot>
  <slot name="get" v-else></slot>
</template>
<script setup lang="ts">
import { computed } from "vue";
const { permissions, keyString: key } = defineProps({
  permissions: {
    type: Object,
    default: () => {}
  },
  keyString: {
    type: String,
    default: ""
  }
});

const hasEdit = computed(() => {
  return permissions[key]?.includes("edit") || permissions[key]?.includes("update");
});
</script>
<style lang="scss"></style>
